/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.kallsonys.service;

/**
 *
 * @author allan
 */
public class CreditCard {
    private long id;
    private long customerId;
    private int type;
    private String number;
    private int expirationMonth;
    private int expirationYear;
    private String verificationNumber;
    private boolean saveCreditCardNumber;
    private String typeStr;

    public String getTypeStr() 
    {
        typeStr = "";
        
        if (this.type == 1)
            typeStr = "AMEX";
        if (this.type == 2)
            typeStr = "Visa";
        if (this.type == 3)
            typeStr = "Master";
        
        return typeStr;
    }
    
    public void setTypeStr(String typeStr) {
        this.typeStr = typeStr;
    }
    
    
    public long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(long customerId) {
        this.customerId = customerId;
    }
    
    

    public int getExpirationMonth() {
        return expirationMonth;
    }

    public void setExpirationMonth(int expirationMonth) {
        this.expirationMonth = expirationMonth;
    }

    public int getExpirationYear() {
        return expirationYear;
    }

    public void setExpirationYear(int expirationYear) {
        this.expirationYear = expirationYear;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public boolean isSaveCreditCardNumber() {
        return saveCreditCardNumber;
    }

    public void setSaveCreditCardNumber(boolean saveCreditCardNumber) {
        this.saveCreditCardNumber = saveCreditCardNumber;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getVerificationNumber() {
        return verificationNumber;
    }

    public void setVerificationNumber(String verificationNumber) {
        this.verificationNumber = verificationNumber;
    }
    
    
}

/*
  CREDITCARD_ID IN NUMBER,
        CREDITCARD_TYPE IN NUMBER,
        CREDITCARD_NUMBER IN VARCHAR2,
        CREDITCARD_EXPIRATIONMONTH IN NUMBER,
        CREDITCARD_EXPIRATIONYEAR IN NUMBER,
        CREDITCARD_VERIFICATIONNUMBER IN VARCHAR2,
        SAVE_CREDITCARDNUMBER IN NUMBER)*/
